import Layout from '@/layout/index.vue';
import type { AppRoute } from '@/types/route';

const blogViewRouter: AppRoute[] = [
  {
    path: '/apps',
    component: Layout,
    redirect: '/apps/index',
    name: 'apps',
    meta: {
      title: '在线工具',
      icon: 'chat-square',
      roles: ['GUEST', 'USER']
      // watermark: true
    },
    children: [
      {
        path: '/apps/index',
        component: () => import('@/views/apps/index.vue'),
        name: 'appsShow',
        meta: {
          title: '在线工具',
          icon: 'chat-square',
          roles: ['GUEST', 'USER']
        },
        hidden: true
      },
      {
        path: '/apps/interest-calculator',
        component: () => import('@/views/apps/interestCalculator/index.vue'),
        name: 'interestCalculator',
        meta: {
          title: '存款利息计算器',
          icon: 'chat-square',
          roles: ['GUEST', 'USER']
        },
        hidden: true
      },
      {
        path: '/apps/json-formatter',
        component: () => import('@/views/apps/jsonFormatter/index.vue'),
        name: 'jsonFormatter',
        meta: {
          title: 'JSON格式化工具',
          icon: 'chat-square',
          roles: ['GUEST', 'USER']
        },
        hidden: true
      },
      {
        path: '/apps/timestamp',
        component: () => import('@/views/apps/timestamp/index.vue'),
        name: 'timestamp',
        meta: {
          title: '时间戳转换',
          icon: 'chat-square',
          roles: ['GUEST', 'USER']
        },
        hidden: true
      },
      {
        path: '/apps/qrcode',
        component: () => import('@/views/apps/qrcode/index.vue'),
        name: 'qrcode',
        meta: {
          title: '二维码生成器',
          icon: 'chat-square',
          roles: ['GUEST', 'USER']
        },
        hidden: true
      },
      // {
      //   path: '/apps/markdown',
      //   component: () => import('@/views/apps/markdown/index.vue'),
      //   name: 'markdown',
      //   meta: {
      //     title: 'Markdown编辑器',
      //     icon: 'chat-square',
      //     roles: ['GUEST', 'USER']
      //   },
      //   hidden: true
      // },
      {
        path: '/apps/image-compress',
        component: () => import('@/views/apps/imageCompress/index.vue'),
        name: 'imageCompress',
        meta: {
          title: '图片压缩工具',
          icon: 'chat-square',
          roles: ['GUEST', 'USER']
        },
        hidden: true
      },
      {
        path: '/apps/base-converter',
        component: () => import('@/views/apps/baseConverter/index.vue'),
        name: 'baseConverter',
        meta: {
          title: '进制转换器',
          icon: 'chat-square',
          roles: ['GUEST', 'USER']
        },
        hidden: true
      },
      {
        path: '/apps/password-generator',
        component: () => import('@/views/apps/passwordGenerator/index.vue'),
        name: 'passwordGenerator',
        meta: {
          title: '随机密码生成',
          icon: 'chat-square',
          roles: ['GUEST', 'USER']
        },
        hidden: true
      },
      {
        path: '/apps/bom-transfer',
        component: () => import('@/views/apps/bomTransfer/index.vue'),
        name: 'bomTransfer',
        meta: {
          title: 'BOM转换工具',
          icon: 'chat-square',
          roles: ['GUEST', 'USER']
        },
        hidden: true
      },
      {
        path: '/apps/ws-test',
        component: () => import('@/views/ws-test/ws-test.vue'),
        name: 'wsTest',
        meta: {
          title: 'WebSocket测试',
          icon: 'chat-square',
          roles: ['GUEST', 'USER']
        },
        hidden: true
      },
      {
        path: '/apps/api-encrypt',
        component: () => import('@/views/apps/api-encrypt/api-encrypt-index.vue'),
        name: 'api-encrypt',
        meta: {
          title: '加密解密测试',
          icon: 'chat-square',
          roles: ['GUEST', 'USER']
        },
        hidden: true
      },
      {
        path: '/apps/editor',
        component: () => import('@/views/apps/editor/index.vue'),
        name: 'editor',
        meta: {
          title: '富文本编辑器',
          icon: 'chat-square',
          roles: ['GUEST', 'USER']
        },
        hidden: true
      }
    ]
  }
];

export default blogViewRouter;
